package com.jeecms.wicool.manager.product.impl;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.product.VIPProductDao;
import com.jeecms.wicool.entity.product.VIPProduct;
import com.jeecms.wicool.manager.product.VIPProductMng;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by cuiyanlei on 15/6/16.
 */
@Transactional
@Service
public class VIPProductMngImpl implements VIPProductMng {
    @Override
    public VIPProduct save(VIPProduct vipProduct) {
        return dao.save(vipProduct);
    }

    @Override
    public VIPProduct deleteById(Integer id) {
        return dao.deleteById(id);
    }

    @Override
    public VIPProduct updateByUpdater(Updater<VIPProduct> updater) {
        return dao.updateByUpdater(updater);
    }

    @Override
    public VIPProduct findById(Integer id) {
        return dao.findById(id);
    }

    @Override
    public Pagination getPage(String productName, String userLevel, int pageNo, int pageSize) {
        return dao.getPage(productName, userLevel, pageNo, pageSize);
    }

    @Autowired
    private VIPProductDao dao;

}
